<template>
	<div class="mt12">
		<div class="hots">
			热门商品
		</div>
		<div class="goods2_list clearfix">

			<a href="/Details" class="fl" v-for="item,index in allgoods">
				<div class="img_square">
					<img :src="item.src">
				</div>
				<div class="g_info">
					<div class="g_name">
						{{item.tit}}
					</div>
					<div class="g_price">
						<span class="s1">￥{{item.nowpic}}</span>
						<span class="s2">￥{{item.lastpic}}</span>
					</div>
					<div class="g_sales">
						已售出{{item.sales}}件
					</div>
				</div>
			</a>
		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				allgoods: [{
						'src': require('../../../assets/imgs/search/1.jpg'),
						'tit': '亲爱的热爱的',
						'nowpic': '338',
						'lastpic': '449',
						'sales': '7789'
					},
					{
						'src': require('../../../assets/imgs/search/2.jpg'),
						'tit': '亲爱的热爱的',
						'nowpic': '338',
						'lastpic': '449',
						'sales': '7789'
					},
					{
						'src': require('../../../assets/imgs/search/3.jpg'),
						'tit': 'w',
						'nowpic': '338',
						'lastpic': '449',
						'sales': '7789'
					},
					{
						'src': require('../../../assets/imgs/search/4.jpg'),
						'tit': '亲爱的热爱的',
						'nowpic': '338',
						'lastpic': '449',
						'sales': '7789'
					},
					{
						'src': require('../../../assets/imgs/search/4.jpg'),
						'tit': '亲爱的热爱的',
						'nowpic': '338',
						'lastpic': '449',
						'sales': '7789'
					},
					{
						'src': require('../../../assets/imgs/search/4.jpg'),
						'tit': '亲爱的热爱的',
						'nowpic': '338',
						'lastpic': '449',
						'sales': '7789'
					},
					{
						'src': require('../../../assets/imgs/search/4.jpg'),
						'tit': '亲爱的热爱的',
						'nowpic': '338',
						'lastpic': '449',
						'sales': '7789'
					},
					{
						'src': require('../../../assets/imgs/search/4.jpg'),
						'tit': '亲爱的热爱的',
						'nowpic': '338',
						'lastpic': '449',
						'sales': '7789'
					},
					{
						'src': require('../../../assets/imgs/search/4.jpg'),
						'tit': '亲爱的热爱的',
						'nowpic': '338',
						'lastpic': '449',
						'sales': '7789'
					},
					{
						'src': require('../../../assets/imgs/search/4.jpg'),
						'tit': '亲爱的热爱的',
						'nowpic': '338',
						'lastpic': '449',
						'sales': '7789'
					},
					{
						'src': require('../../../assets/imgs/search/4.jpg'),
						'tit': '亲爱的热爱的',
						'nowpic': '338',
						'lastpic': '449',
						'sales': '7789'
					},
					{
						'src': require('../../../assets/imgs/search/4.jpg'),
						'tit': '亲爱的热爱的',
						'nowpic': '338',
						'lastpic': '449',
						'sales': '7789'
					}
				]
			}
		}
	}
</script>

<style scoped="scoped">
	.goods2_list {
		position: relative;
		z-index: 0;
	}

	.goods2_list a {
		position: relative;
		margin-left: 2%;
		width: 47%;
		padding: 0;
		padding-bottom: 0.6rem;
		background-color: #fff;
		margin-top: 16px;
		border-radius: 8px 8px;
	}

	.hots {
		background: #fff;
		line-height: 50px;
		color: #000000;
		font-size: 1rem;
		padding-left: 2%;
	}

	.goods2_list a .g_info {
		padding: 0px 4px;
	}

	.g_info .g_name {
		font-size: 0.875rem;
		color: #6E6E6E;
		line-height: normal;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.g_info .g_price .s1 {
		font-size: 0.875rem;
		color: #FF3303;
	}

	.g_info .g_price .s2 {
		font-size: 0.75rem;
		color: #6E6E6E;
		text-decoration: line-through;
	}

	.g_info .g_sales {
		font-size: 0.75rem;
		color: #6E6E6E;
	}
</style>
